<?php $form = $this->beginWidget('CActiveForm', array(
	'id'=>'frmGroup',
	'method'=>'get',
	'enableClientValidation' => true,
	'clientOptions'=> array('validateOnSubmit'=>true),
)); ?>
	<div class="form-group row">
		<div class="col-md-4">
			<?php echo $form->textField($model, 'key', array(
				'name'=>'key', 
				'id'=>'group_key',
				'class'=>'form-control', 
				'placeholder'=>'Enter keyword to search'
			)) ?>
		</div>
		<div class="col-md-2">
			<button type="submit" class="btn btn-default">Search</button>
			<span class="glyphicon glyphicon-chevron-down btnTgle" title="Advance Search"></span>
		</div>
	</div>
	
	<!-- Advance search -->
	<div class="more-fields form-horizontal" style="display: none">
		<div class="form-group row">
			<?php echo $form->labelEx($model, 'type', array('class'=>'col-md-1 control-label')) ?>
			<div class="col-md-1">
				<label class="control-label"><?php echo CHtml::radioButton('type', $model->type==1, array('value'=>1, 'id'=>'rdGroup')) ?> Group</label>
			</div>
			<div class="col-md-1">
				<label class="control-label"><?php echo CHtml::radioButton('type', $model->type==2, array('value'=>2, 'id'=>'rdPage')) ?> Page</label>
			</div>
		</div>
		<div class="form-group row">
			<?php echo $form->labelEx($model, 'limit', array('class'=>'col-md-1 control-label')) ?>
			<div class="col-md-2">
				<?php echo $form->textField($model, 'limit', array('name'=>'limit', 'class'=>'form-control', )) ?>
			</div>
		</div>
	</div>
	
	<input type="hidden" id="curQuery" value="" />
<?php $this->endWidget(); ?>
